﻿<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
  <title>超级医生</title>
  <link rel="stylesheet" href="../static/style.css">

</head>
<body>
<!-- partial:index.partial.html -->
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <title>Ionic Elastichat</title>
    <link href="../static/css/ionic.min.css" rel="stylesheet">
    <script src="../static/js/ionic.bundle.min.js"></script>
    <!-- moment -->
    <script src="../static/js/moment.min.js"></script>
    <!-- angular moment -->
    <script src="../static/js/angular-moment.min.js"></script>
  </head>
  <body ng-app="elastichat">
    <ion-nav-bar class="bar-positive" no-tap-scroll="false">
      <ion-nav-back-button class="button-icon ion-arrow-left-c">
      </ion-nav-back-button>
    </ion-nav-bar>
    <!-- 
      The views will be rendered in the <ion-nav-view> directive below
      Templates are in the /templates folder (but you could also
      have templates inline in this html file if you'd like).
      -->
    <ion-nav-view></ion-nav-view>
    <script id="templates/UserMessages.html" type="text/ng-template">
      <ion-view id="userMessagesView"
          cache-view="false" 
          view-title="<i class='icon ion-chatbubble user-messages-top-icon'></i> <div class='msg-header-username'> 超级医生 </div>">
        
        <div class="loader-center" ng-if="!doneLoading">
            <div class="loader">
              <i class="icon ion-loading-c"></i>
            </div>
        </div>
      
          <ion-content has-bouncing="true" class="has-header has-footer" 
              delegate-handle="userMessageScroll">
            
              <div ng-repeat="message in messages" class="message-wrapper"
                  on-hold="onMessageHold($event, $index, message)">
      
                  <div ng-if="user._id !== message.userId">
                      
                    <img ng-click="viewProfile(message)" class="profile-pic left" 
                          ng-src="../static/pic/hospital.png" onerror="onProfilePicError(this)" />
      
                      <div class="chat-bubble left">
      
                          <div class="message" ng-bind-html="message.text | nl2br" autolinker>
                          </div>
      
                          <div class="message-detail">
                              <span ng-click="viewProfile(message)" 
                                  class="bold">超级医生</span>,
                              <span am-time-ago="message.date"></span>
                          </div>
      
                      </div>
                  </div>
      
                  <div ng-if="user._id === message.userId">
                    
                       <img ng-click="viewProfile(message)" class="profile-pic right" 
                          ng-src="../static/pic/一二.jpg" onerror="onProfilePicError(this)" />
                    
                      <div class="chat-bubble right">
      
                          <div class="message" ng-bind-html="message.text | nl2br" autolinker>
                          </div>
      
                          <div class="message-detail">
                              <span ng-click="viewProfile(message)" 
                                  class="bold">王雄俊</span>,
                              <span am-time-ago="message.date"></span>
                          </div>
      
                      </div>
                    
                  </div>
      
                  <div class="cf"></div>
      
              </div>
          </ion-content>
      
          <form method="post" name="sendMessageForm" ng-submit="sendMessage(sendMessageForm)" novalidate>
              {% csrf_token %}
              <ion-footer-bar class="bar-stable item-input-inset message-footer" keyboard-attach>
                  <label class="item-input-wrapper">
                      <textarea ng-model="input.message" value="" placeholder="Send 超级医生 a message..." required minlength="1" maxlength="1500" msd-elastic></textarea>
                  </label>
                  <div class="footer-btn-wrap">
                    <button class="button button-icon icon ion-android-send footer-btn" type="submit">
{#                        ng-disabled="!input.message || input.message === ''">#}
                    </button>
                  </div>
              </ion-footer-bar>
          </form>
          
      </ion-view>
    </script>
  </body>
</html>
<!-- partial -->
  <script src='../static/js/jquery.min.js'></script><script  src="../static/script.js"></script>
</body>
</html>
